﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CenterDateAchieve.Forms;
using IBLL.View;
using Model;

namespace CenterDateAchieve
{
    public partial class HotelDefineForm : EditFormBase,IEditView
    {
        public HotelDefineForm()
        {
            InitializeComponent();
        }
        public override void OnAdjustUI(EntityState editStat, IDataTrans data)
        {
            if (editStat == EntityState.Edit)
            {
                this.txt_ID.Enabled = false;
                this.btDelete.Enabled = true;
            }
            else
            {
                this.txt_ID.Enabled = true;
                this.btDelete.Enabled = false;
            }
        }
        private void btNew_Click(object sender, EventArgs e)
        {
            InvokeCreateAction(sender, e);
        }

        private void btSave_Click(object sender, EventArgs e)
        {
            InvokeSaveAction(sender, e);
        }

        private void btDelete_Click(object sender, EventArgs e)
        {
            InvokeDeleteAction(sender, e);
        }

        private void btExit_Click(object sender, EventArgs e)
        {
            ExitAction(sender, e);
        }

        #region IViewForm 成员

        public event EventHandler ExitAction;

        #endregion
    }
}
